<include file="public/layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>窖藏方式管理</h3>
        <h5>窖藏方式添加与管理</h5>
      </div>
    </div>
  </div>
  <div id="explanation" class="explanation">
    <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span title="收起提示" id="explanationZoom"></span>
    </div>
    <ul>
      <li>温馨提示：顶级分类（一级大类）设为推荐时才会在首页楼层中显示</li>
      <li>最多只能分类到三级</li>
    </ul>
  </div>
  <form method="post">
    <input type="hidden" value="ok" name="form_submit">
    <div class="flexigrid">
      <div class="mDiv">
        <div class="ftitle">
          <h3>窖藏方式列表</h3>
          <h5></h5>
        </div>
      </div>
      <div class="hDiv">
        <div class="hDivBox">
          <table cellspacing="0" cellpadding="0" width="100%">
            <thead style="width: 100%;">
              <tr style="width: 100%;">
                <th align="center" axis="col0" class="sign">
                  <div style="text-align: center; width: 24px;"><i class="ico-check"></i></div>
                </th>
                <th align="center" axis="col1" class="handle" style="width: 45%;"><div style="text-align: center; width: 150px;">窖藏方式</div></th>
                <th align="center" axis="col2" style="width: 45%;"><div style=" width: 60px;margin-right: 70px;float: right;">操作</div></th>
              </tr>
            </thead>
          </table>
        </div>
      </div>
      <div class="tDiv">
        <div class="tDiv2">
         <a href="{:U('Cellar/addeditType')}">
          <div class="fbutton">
            <div title="新增分类" class="add">
              <span><i class="fa fa-plus"></i>添加方式</span>
            </div>
          </div>
         </a> 
        </div>
        <div style="clear:both"></div>
      </div>      
      <div style="height: auto;" class="bDiv">
        <table cellspacing="0" cellpadding="0" border="0" id="article_cat_table" class="flex-table autoht">
          <tbody>
          <foreach name="cellartype" item="vo" key="k" >
            <tr>
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<i class="ico-check"></i>      
                </div>
              </td>
              <td class="sort">
	              <div style="text-align: center; width: 60px;">{$vo.title}</div>
              </td>
              <td class="handle">
                <div style="float: right;min-width:150px !important; max-width:inherit !important;">
                  <span class="btn"><em><i class="fa fa-cog"></i>操作<i class="arrow"></i></em>
                  <ul>
                  	<li><a href="javascript:;">预览</a></li>
                    <li><a href="{:U('Cellar/addeditType',array('id'=>$vo.id))}">编辑</a></li>            
                    <li><a href="javascript:del('{:U('Cellar/delType',array('id'=>$vo.id))}');">删除</a></li>
                  </ul>
                  </span>
                </div>
              </td>
            </tr> 
          </foreach>
          </tbody>
        </table>        
      </div>
    </div>
</div>
  <script>
      $(document).ready(function(){	
	    // 表格行点击选中切换
	    $('.bDiv > table>tbody >tr').click(function(){
		    $(this).toggleClass('trSelected');
		});				
	 });
  
     // 点击展开 收缩节点
     function treeClicked(obj,cat_id,parent_id_path){

		 var src = $(obj).attr('src');
		 if(src == '/public/static/images/tv-expandable.gif')
		 {
			 $(".parent_id_"+cat_id).show();
			 $(obj).attr('src','/public/static/images/tv-collapsable-last.gif');
		 }else{			 
		     $("tr[parent_id_path^='"+parent_id_path+"_']").hide().find('img').attr('src','/public/static/images/tv-expandable.gif');
			 $(obj).attr('src','/public/static/images/tv-expandable.gif');			 
			 
		 }		 
	 }  	
  </script>
</body>
</html>
